import  request from './server'



export  const listSearch = {
    methods:{
        sendReq(params,callback){
            request({
                method:params.method || 'post',
                url:params.url,
                data:params.data || {},
                params:params.payload || {},
                headers:{
                    'Content-type':params.contentType || 'application/json;charset=utf-8'
                }
            }).then((res)=>{
              if(res && res.data){
                  callback && callback(res.data);
              }
            },
                (error)=>{
                    console.log(error)
                })
        }
    }
}
